<template>
	<van-tabbar  route :z-index="0" v-model="active">
		<van-tabbar-item to="/" icon="home-o">主页</van-tabbar-item>
		<van-tabbar-item  to="/sort" icon="apps-o">分类</van-tabbar-item>
		<van-tabbar-item to="/cart" :dot="cartNum==0?false:true"
			icon="shopping-cart-o">购物车</van-tabbar-item>
		<van-tabbar-item to='/mine' icon="contact">我的</van-tabbar-item>
	</van-tabbar>
</template>

<script>
	import {mapGetters} from "vuex"	
	export default {
		data() {
			return {
				active: 0,
			}
		},
		computed:{
			 ...mapGetters(['cartNum'])
		}
	}
</script>

<style scoped="scoped">
	
</style>
